import request from '/@/utils/request';

export function SettingApi() {
	return {
		create_platform: (data: object) => {
			return request({
				url: 'management/platform/setting/create',
				method: 'post',
				data,
			});
		},

		update_platform: (data: object) => {
			return request({
				url: 'management/platform/setting/update',
				method: 'post',
				data,
			});
		},

		view_platform: (type: string) => {
			return request({
				url: `management/platform/setting/view/type/${type}`,
			});
		},

		all_platform: () => {
			return request({
				url: 'management/platform/setting/all',
			});
		},

        view_base_setting: () => {
            return request({
                url: 'management/platform/setting/view/base',
            });
        },

        view_order_setting: () => {
            return request({
                url: 'management/platform/setting/view/order',
            });
        },


        update_base_setting: (data: object) => {
            return request({
                url: 'management/platform/setting/update/base',
                method: 'post',
                data,
            });
        },

        update_order_setting: (data: object) => {
            return request({
                url: 'management/platform/setting/update/order',
                method: 'post',
                data,
            });
        },

    };
}
